/**
 * Description:一些注释<br/>
 * CreateTime:2019-04-03<br/>
 * Creater: yangpengfei360@126.com <br/>
 * @author yangpengfei
 */
package cn.cnsy123.bookwebsiteserver.entity;

import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Description:一些注释<br/>
 * CreateTime:2019-04-03<br/>
 * Creater: yangpengfei360@126.com <br/>
 * @author yangpengfei
 */
@Entity
@Table(name = "SYS_USER_DETAIL_INFO")
public class SysUserDetailInfo {

    @Id
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    @Column(name = "USER_ID",length=11,nullable=false,unique=true)
    private Long userId;
    
    @Basic
    @Column(name = "USER_REALNAME",length = 18,nullable = false)
    private String realName;
    
    @Basic
    @Column(name = "USER_CARDID",length = 18,nullable = false)
    private String cardId;
    
    @Temporal(TemporalType.DATE)
    @Column(name = "USER_BIRTHDAY")
    private Date birthDay;
    
    @Column(name = "USER_ROLE_ID")
    private Long roleId;

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getCardId() {
        return cardId;
    }

    public void setCardId(String cardId) {
        this.cardId = cardId;
    }

    public Date getBirthDay() {
        return birthDay;
    }

    public void setBirthDay(Date birthDay) {
        this.birthDay = birthDay;
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    public SysUserDetailInfo() {
        
    }

    public SysUserDetailInfo(Long userId, String realName, String cardId, Date birthDay) {
        this.userId = userId;
        this.realName = realName;
        this.cardId = cardId;
        this.birthDay = birthDay;
    }

    public SysUserDetailInfo(Long userId, String realName, String cardId, Date birthDay, Long roleId) {
        this.userId = userId;
        this.realName = realName;
        this.cardId = cardId;
        this.birthDay = birthDay;
        this.roleId = roleId;
    }

    @Override
    public String toString() {
        StringBuilder builder = new StringBuilder();
        builder.append("{\"userId\":");
        builder.append(userId);
        builder.append(", \"realName\":");
        builder.append(realName);
        builder.append(", \"cardId\":");
        builder.append(cardId);
        builder.append(", \"birthDay\":");
        builder.append(birthDay);
        builder.append(", \"roleId\":");
        builder.append(roleId);
        builder.append("}");
        return builder.toString();
    }

    
}
